//
//  BaseViewController.m
//  Courses
//
//  Created by YiXuePxh on 15/5/4.
//  Copyright (c) 2015年 boyibang. All rights reserved.
//

#import "BaseViewController.h"
#import "PXHGetNetworkStatus.h"
#import "WTFColors.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(BOOL)shouldAutorotate{//应用支持横竖屏 在这里设置为NO ，所有的子Controller默认都是不支持横屏
    return NO;
}
//检测网络状态
-(void)showNetStatus{
    if ([PXHGetNetworkStatus isHaveNetWork]) {
        UIAlertView* alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"无网络访问请链接网络！" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
        [alert show];
    }
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
